﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package net.wooga.pets.utils {
    import flash.text.*;

    public class TextFormats {

        public static const ASK_BUTTON_LABEL:String = "ASK_BUTTON_LABEL";
        public static const PETS_BUTTON_LABEL:String = "PETS_BUTTON_LABEL";
        public static const SPEECHBUBBLE_TEXT:String = "SPEECHBUBBLE_TEXT";
        public static const MORE_PETS_LABEL:String = "MORE_PETS_LABEL";
        public static const MYRIAD_PRO:String = "MYRIAD_PRO";

        private static var _formats:DictStorage;

        public static function registerFonts():void{
            initFormats();
        }
        private static function initFormats():void{
            _formats = new DictStorage();
            initSpeechBubbleFormat();
            initMyriadProFormat();
            initPetsButtonLabelFormat();
            initAskButtonLabelFormat();
            initMorePetLabelFormat();
        }
        private static function initSpeechBubbleFormat():void{
            var _local1:TextFormat = new TextFormat();
            _local1.font = "MyriadProFont";
            _local1.align = TextFormatAlign.CENTER;
            _local1.bold = true;
            _local1.color = "0xFF3355";
            _local1.size = 16;
            var _local2:TextFormatVO = new TextFormatVO(_local1);
            _formats.set(SPEECHBUBBLE_TEXT, _local2);
        }
        private static function initPetsButtonLabelFormat():void{
            var _local1:TextFormat = new TextFormat();
            _local1.font = "MyriadProFont";
            _local1.align = TextFormatAlign.CENTER;
            _local1.bold = true;
            _local1.color = 0xFFFFFF;
            _local1.size = 22;
            var _local2:Object = {y:4};
            var _local3:TextFormatVO = new TextFormatVO(_local1, _local2);
            _formats.set(PETS_BUTTON_LABEL, _local3);
        }
        private static function initAskButtonLabelFormat():void{
            var _local1:TextFormat = new TextFormat();
            _local1.font = "MyriadProFont";
            _local1.align = TextFormatAlign.CENTER;
            _local1.bold = true;
            _local1.color = 0xFFFFFF;
            _local1.size = 14;
            var _local2:TextFormatVO = new TextFormatVO(_local1);
            _formats.set(ASK_BUTTON_LABEL, _local2);
        }
        private static function initMorePetLabelFormat():void{
            var _local1:TextFormat = new TextFormat();
            _local1.font = "MyriadProFont";
            _local1.align = TextFormatAlign.LEFT;
            _local1.bold = true;
            _local1.color = 4399361;
            _local1.size = 46;
            var _local2:TextFormatVO = new TextFormatVO(_local1);
            _formats.set(MORE_PETS_LABEL, _local2);
        }
        private static function initMyriadProFormat():void{
            var _local1:TextFormat = new TextFormat();
            _local1.font = "MyriadProFont";
            _local1.bold = true;
            var _local2:TextFormatVO = new TextFormatVO(_local1);
            _formats.set(MYRIAD_PRO, _local2);
        }
        public static function getFormattedTextField(_arg1:String, _arg2:TextField=null, _arg3:String=null):TextField{
            var _local6:String;
            _arg2 = ((_arg2) || (new TextField()));
            var _local4:TextFormatVO = (_formats.get(_arg1) as TextFormatVO);
            var _local5:Object = _local4.settings;
            for (_local6 in _local5) {
                _arg2[_local6] = _local5[_local6];
            };
            if (_arg3 != null){
                _arg2.htmlText = _arg3;
            };
            _arg2.selectable = false;
            _arg2.setTextFormat(_local4.format);
            _arg2.embedFonts = true;
            return (_arg2);
        }

    }
}//package net.wooga.pets.utils 

import flash.text.*;

class TextFormatVO {

    private var _format:TextFormat;
    private var _settings:Object;

    public function TextFormatVO(_arg1:TextFormat, _arg2:Object=null){
        this._format = _arg1;
        this._settings = ((_arg2) || ({}));
        this._settings.embedFonts = true;
    }
    public function get format():TextFormat{
        return (this._format);
    }
    public function set format(_arg1:TextFormat):void{
        this._format = _arg1;
    }
    public function get settings():Object{
        return (this._settings);
    }
    public function set settings(_arg1:Object):void{
        this._settings = _arg1;
    }

}
